package com.iweb.test0809;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * ClassName: TestServlet
 * Package: com.iweb.test0809
 * Description:
 *
 * @Author Jerry
 * @Create 2024/8/9 10:28
 * @Version 1.0
 */
@WebServlet(value = "/test666")
public class TestServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        HttpSession session=req.getSession();
        System.out.println("来了一个请求");
        //session.invalidate();
        session.setMaxInactiveInterval(10);
    }
}
